Setting the Text Color

You can also change the color of the text content on an HTML Web page, by using the color property.

Let’s do the following steps to set the color of the text present on an HTML Web page.


<!DOCTYPE html>
<html>
<head>
    <title>Setting the Text Color</title>
<style type=”text/css”>
    Body{color:red; font-family:Georgia; font-size: large;}
</style>
</head>
<body>
    <h1>Example of setting Text color</h1>
    The color of text present on the Web page is red.
    <img src=”img/smiley.gif” />
</body>
</html>

Save the document with the name of TextColor.html and open on browser.